package com.syq.dao;

import com.syq.pojo.SysScene;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysSceneMapper {

    @Insert("insert into sys_scene (scene_name,create_by) values (#{sceneName},#{creatBy}) ")
    void addScene(SysScene sysScene);

    @Select("select * from sys_scene where scene_name=#{sceneName} and where")
    SysScene findByUserIdAndSceneName(@Param("userId") Long userId, @Param("sceneName") String sceneName);

    @Select("select * from sys_scene where where")
    List<SysScene> findAllByUserId(Long userId);
}
